/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.webos.java.base.db.apps;

import java.io.Serializable;
import org.webos.java.base.db.*;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 *
 * @author Kostya
 */

@Entity
@Table(name="core_settings")
public class Setting implements Serializable {
    private int id;
    private User user;
    private DBApplication application;
    private String option;
    private String value;

    /**
     * @return the id
     */
    @Id
    @GeneratedValue
    public int getId() {
        return id;
    }

    /**
     * @param id the id to set
     */
    public void setId(int id) {
        this.id = id;
    }

    /**
     * @return the user
     */
    @ManyToOne
    public User getUser() {
        return user;
    }

    /**
     * @param user the user to set
     */
    public void setUser(User user) {
        this.user = user;
    }

    /**
     * @return the application
     */
    @ManyToOne
    public DBApplication getApplication() {
        return application;
    }

    /**
     * @param application the application to set
     */
    public void setApplication(DBApplication application) {
        this.application = application;
    }

    /**
     * @return the option
     */
    @Column(name="option_name")
    public String getOption() {
        return option;
    }

    /**
     * @param option the option to set
     */
    public void setOption(String option) {
        this.option = option;
    }

    /**
     * @return the value
     */
    @Column
    public String getValue() {
        return value;
    }

    /**
     * @param value the value to set
     */
    public void setValue(String value) {
        this.value = value;
    }
}
